﻿CREATE TABLE [dbo].[DeviceType]
(
	[Id] INT NOT NULL PRIMARY KEY, 
    [Name] NVARCHAR(50) NULL, 
    [DES] NVARCHAR(250) NULL, 
    [Pid] INT NULL
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'设备类型ID',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'DeviceType',
    @level2type = N'COLUMN',
    @level2name = N'Id'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'设备类型名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'DeviceType',
    @level2type = N'COLUMN',
    @level2name = N'Name'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'设备类型描述',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'DeviceType',
    @level2type = N'COLUMN',
    @level2name = N'DES'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'设备类型父级ID',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'DeviceType',
    @level2type = N'COLUMN',
    @level2name = N'Pid'